package com.yqg.education.service.impl;

import com.yqg.education.entity.TrainSign;
import com.yqg.education.mapper.TrainSignMapper;
import com.yqg.education.service.ITrainSignService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.Map;

/**
 * TrainSignServiceImpl 服务实现类
 *
 * @author 张芸博
 * @since 2025-04-10
 */
@Service
public class TrainSignServiceImpl extends ServiceImpl<TrainSignMapper, TrainSign> implements ITrainSignService {
    @Resource
    private TrainSignMapper trainSignMapper;

    @Override
    public Map<String,Object> stuFindIsTrainSign(Long periodId, Long stuId) {

        Long l = trainSignMapper.stuFindIsTrainSign(periodId, stuId);
        Map map = new HashMap<>();
        Boolean result = l > 0 ? true : false;
        map.put("isTrainSign",result);
        return map;
    }
}
